<!--
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/business//station/Station.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/business//station/Station.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'Id',
                footer: "Foots",
                cnName: '工位表',
                name: '/station/Station',
                url: "/Station/",
                sortName: "StationNumber",
                foreignKey:null
            });
            const editFormFields = ref({"StationNumber":"","StationName":"","Sort":"","StationType":"","Enable":"","StateModifyDate":"","Notes":""});
            const editFormOptions = ref([[{"title":"工位号","field":"StationNumber"},
                               {"title":"工位名称","field":"StationName"},
                               {"title":"排序","field":"Sort","type":"number"},
                               {"dataKey":"StationType","data":[],"title":"工位类型","field":"StationType","type":"select"}],
                              [{"dataKey":"enable","data":[],"title":"是否启用","field":"Enable","type":"select"},
                               {"title":"状态更新时间","field":"StateModifyDate","type":"datetime"},
                               {"title":"备注","field":"Notes","type":"textarea"}]]);
            const searchFormFields = ref({"StationNumber":"","StationName":"","Sort":"","State":"","StationType":"","Enable":"","Notes":"","StateModifyDate":""});
            const searchFormOptions = ref([[{"title":"工位号","field":"StationNumber"},{"title":"工位名称","field":"StationName"},{"title":"排序","field":"Sort","type":"number"}],[{"title":"工位状态","field":"State","type":"number"},{"dataKey":"StationType","data":[],"title":"工位类型","field":"StationType","type":"select"}],[{"title":"状态更新时间","field":"StateModifyDate","type":"datetime"},{"dataKey":"enable","data":[],"title":"是否启用","field":"Enable","type":"select"},{"title":"备注","field":"Notes"}]]);
            const columns = ref([{field:'Id',title:'主键',type:'string',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'StationNumber',title:'工位号',type:'string',sort:true,width:110,align:'left',sort:true},
                       {field:'StationName',title:'工位名称',type:'string',link:true,width:110,align:'left'},
                       {field:'Sort',title:'排序',type:'int',width:110,align:'left'},
                       {field:'State',title:'工位状态',type:'int',width:110,readonly:true,align:'left'},
                       {field:'StationType',title:'工位类型',type:'string',bind:{ key:'StationType',data:[]},width:110,align:'left'},
                       {field:'Enable',title:'是否启用',type:'int',bind:{ key:'enable',data:[]},width:110,align:'left'},
                       {field:'StateModifyDate',title:'状态更新时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'Notes',title:'备注',type:'string',width:180,align:'left'},
                       {field:'DeletionFlag',title:'删除标识',type:'int',width:110,hidden:true,align:'left'},
                       {field:'CreateUserName',title:'添加人',type:'string',width:120,align:'left'},
                       {field:'CreateUserId',title:'添加人ID',type:'string',width:120,align:'left'},
                       {field:'CreateDate',title:'添加时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'ModifyUserName',title:'修改人',type:'string',width:120,align:'left'},
                       {field:'ModifyUserId',title:'修改人ID',type:'string',width:120,align:'left'},
                       {field:'ModifyDate',title:'修改时间',type:'datetime',width:150,align:'left',sort:true}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
